<!--
 * @description  : 证件-实地核查列表（辽宁特例）
 * @descriptionDetail: 证件-实地核查列表（辽宁特例）
 * @author       : 孙楠博
 * @create       : 2024-01-10 17:30:45
-->
<template>
  <view class="page">
    <view class="cert-box" @click="toInputInfo">
      <u-row class="u-p-b-28">
        <u-col>
          <view class="cert-content">
            发起人：<text>{{ checkInfo.startUserName }}</text>
          </view>
          <view class="cert-main-title">
            {{ checkInfo.taskTitle }}
          </view>
        </u-col>
      </u-row>
      <u-row>
        <u-col span="6">
          <view class="cert-content" style="font-size:26rpx">
            发起时间
          </view>
          <view class="cert-main-title-time">
            {{ checkInfo.startTime || '&nbsp;' }}
          </view>
        </u-col>
        <u-col span="6">
          <view class="cert-content" style="font-size:26rpx">
            当前阶段
          </view>
          <view class="cert-main-title" style="font-weight:500">
            {{ checkInfo.actName || '&nbsp;' }}
          </view>
        </u-col>
      </u-row>
    </view>
  </view>
</template>

<script>
import {dateUtils,} from "@/common/util";
import certificateService from "@/service/certificate/certificate.service";
export default {
  props: {
    checkInfo:{
      type:Object,
      required:true,
    },
    tabCurrent:{
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      dateUtils,
      padding0:'0px',
    };
  },
  methods: {
    toInputInfo(){
      if(this.checkInfo.processDefKey){
        let params = {
          docInsUuid:this.checkInfo.bizUuid,
          processDefKey:this.checkInfo.processDefKey,
        }
        this.setRouteParam(params);
        /** 辽宁特例 start  add by 孙楠博 */
        let self = this;
        const tabCurrent = this.tabCurrent;
        if (tabCurrent === 0) {
          this.$modal.alert('确定开始实地核查吗？', '提示', () => {
            // 点击确认后实地核查自动签到
            certificateService.signFieldAudit(self.checkInfo.bizUuid);
            self.$u.route('pages/certificate/fieldAudit/entryFieldAudit', {
              from: tabCurrent,
            });
          }, '确定',true);
        } else {
          this.$u.route('pages/certificate/fieldAudit/entryFieldAudit', {
            from: tabCurrent,
          });
        }
        /** 辽宁特例 end  add by 孙楠博 */
      }else{
        this.$u.toast(`文书[${this.checkInfo.actName}]没有对应的路径`);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
@import "style/certificate/common.scss";
.page{
	padding: 0;
	width: 100%;
}
/deep/.u-col{
  padding:0;
}
.cert-main-title-time{
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    display: flex;
    align-items: center;
}
.check-item{
  padding:10px;
}

  .cert-box{
    padding:10px!important;
    margin:5px 10px!important;
		background-color: #ffffff ;
    border-radius: 15px;

  }

</style>
